home *** CD-ROM | disk | FTP | other *** search
Text File | 1988-01-07 | 2.9 KB | 162 lines | [TEXT/PJMM] |
- UNIT PlotGlobals;
-
- INTERFACE
-
- USES
- ROM85, PrintTraps;
-
- { Global Constants }
- CONST
-
- {multifinder stuff}
- SysEnvTrap = $90;
- WNETrapNum = $60; {trap number of WaitNextEvent}
- UnImplTrapNum = $9F; {trap number of "unimplemented trap"}
-
- {window constants}
- ZoomBox = 8; {window type}
- MinWidth = 80;
- MinHeight = 80;
- mBarHeightGlobal = $BAA;
- GrayRgnLowMemGlobal = $9EE;
- sBarWidth = 16;
-
- rsrc = 'PLTR'; {creator bytes restype}
-
- {dialog stuff}
- AboutDialog = 256;
- ParamDialog = 257;
- MessageDialog = 258;
- AlertDialog = 260;
-
- { menu res id's}
- AppleMenu = 256;
- FileMenu = 257;
- EditMenu = 258;
- ColorMenu = 259;
- OptionMenu = 260;
- {submenus id's}
- GraphMenu = 44;
- AxisMenu = 45;
- BackgroundMenu = 46;
-
- MenuCount = 5;
- SubMenuStart = 6;
- TotalMenuCount = 8;
- AppleM = 1;
- FileM = 2;
- EditM = 3;
- ColorM = 4;
- OptionM = 5;
- GraphM = 6;
- AxisM = 7;
- BackGroundM = 8;
-
- {menu items}
- aAbout = 1;
-
- fPlot = 1;
- fSave = 3;
- fSaveAs = 4;
- fPageSet = 5;
- fPrint = 6;
- fQuit = 8;
-
- eUndo = 1;
- eCut = 3;
- eCopy = 4;
- ePaste = 5;
- eClear = 6;
-
- oWindowRect = 1;
- oPageRect = 2;
-
- {Dialog Items}
- dOK = 1;
- dA = 2;
- dB = 3;
- dC = 4;
- dSTEP = 5;
- dXSCALE = 6;
- dYSCALE = 7;
-
- TYPE
-
- Document = RECORD
- aParam : real;
- bParam : real;
- cParam : real;
- stepParam : real;
- xParam : integer;
- yParam : integer;
- drawing : PicHandle;
- print : THPrint;
- FileName : str255;
- volRefNum : integer;
- END;
- DocPtr = ^Document;
- DocHandle = ^DocPtr;
-
- LongAndByte = RECORD
- CASE integer OF
- 1 : (
- longView : LongInt
- );
- 2 : (
- byteView : RECORD
- byte0 : SignedByte;
- byte1 : Signedbyte;
- byte2 : Signedbyte;
- byte3 : Signedbyte;
- END;
- );
- END;
-
- { Global Variables }
- VAR
-
- {my misc stuff}
- Finished : boolean;
- mBarHeight : Integer;
-
- {Multifinder stuff}
- WNE : boolean; {Multifinder friendly}
- SysEnv : boolean; {Multifinder friendly}
- theWorld : SysEnvRec; {not in LSP 1.11 }
- typeOfMac : integer;
- mouseRgn : RgnHandle; {cursor region to pass to WNE}
-
- {menu stuff}
- myMenus : ARRAY[1..TotalMenuCount] OF MenuHandle;
- GraphColor : integer;
- AxisColor : integer;
- BackgroundColor : integer;
- color : ARRAY[1..8] OF LongInt;
- Option : integer; {1 = windowrect, 2=pagerect}
-
- {rectangles}
- DragArea : Rect; {window drag area}
- GrowArea : Rect; {window grow area}
- Screen : Rect; {physical screen area}
- PlotWindowRect : Rect; {beginning window size}
- ZoomRect : Rect; {zoomed window size}
- HCRect, VCRect, GrowRect : Rect; {scroller rects}
- PicRect : Rect; {content region of window less scrollers}
- PageRect : rect;
-
- {dialogs stuff}
- ItemHit : integer;
- dialogflg : boolean;
-
- {plot stuff}
- a, b, c, x1, x2, check, step : real;
- result, xscale, yscale : integer;
- PlotWindow : WindowPtr;
- PlotWindowPeek : WindowPeek;
- PlotDocHandle : DocHandle;
- DrawingPic : PicHandle;
- PrintingPic : PicHandle;
-
- IMPLEMENTATION
-
- END.